package com.lagou.edu.controller;

import com.lagou.edu.service.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/mail")
public class MailController {

    @Autowired
    MailService mailService;

    @GetMapping("/sendMail")
    public Boolean sendMail(String to, String subject, String content) {
        return mailService.sendMail(to, subject, content);
    }
}
